Open
Conversation
mkaput
reviewed
Apr 8, 2026
| description: Practical prompting patterns for coding agents, from framing and execution guidance to multimodal input and walkthroughs. | ||
| --- | ||
|
|
||
| import ClapButton from "../../../components/ClapButton.astro"; |
Member
There was a problem hiding this comment.
why claps are not set up for each section in this file? this also applies to other files
mkaput
requested changes
Apr 8, 2026
| void fetch(clapsUrl) | ||
| .then((response) => response.json()) | ||
| .then((data: unknown) => { | ||
| const parsed = ClapsResponse.safeParse(data); |
| window.removeEventListener("pagehide", sendClaps); | ||
|
|
||
| const body = JSON.stringify({ claps: local.claps }); | ||
| navigator.sendBeacon(clapsUrl, body); |
Member
There was a problem hiding this comment.
won't adblock kill these requests?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a clapping feature to the guide — readers can express appreciation for individual sections, not just whole articles.
What's included
ClapButton Astro component (src/components/ClapButton.astro)
Technical decisions worth noting:
Placed after every ## section across all 17 articles (60 sections total), each with a unique slug matching the article path + section heading.
.env.example updated with PUBLIC_API_URL.
API
The component talks to a separate self-hosted API (agentic-engineering-applause-feature repo). Set PUBLIC_API_URL in .env to point at it.
GET /claps?slug={slug} → { count, max_claps, user_claps }
POST /claps?slug={slug} body: { claps: number }